from rest_framework_jwt.utils import jwt_payload_handler


def OwnResponse(token,user=None,requests=None):
    return {
        'username':user.username,
        'token':token,
        'userid':user.id
    }

def OwnPayload(user):
    payload=jwt_payload_handler(user)
    del payload['email']
    payload['mobile']=user.mobile
    return payload